import pytest
from selenium.webdriver import Firefox
from selenium.webdriver.firefox.service import Service as FirefoxService


@pytest.fixture(scope="session")
def host():
    url = {
        "test": "http://132.252.236.10:8090",
        "prod": "http://10.130.225.226:10000"
    }
    return url.get("test")


@pytest.fixture(scope="session")
def driver():
    service = FirefoxService(executable_path="geckodriver.exe")
    d = Firefox(service=service)
    d.maximize_window()
    d.implicitly_wait(5)
    yield d
    d.close()
